<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <th:block th:replace="include/css"/>
    <link rel="stylesheet" type="text/css" href="/static/css/bbs_list.css">
    <title><th:block th:text="${pCategory.name}"/></title>
</head>
<body>
<th:block th:replace="include/header:: header"/>
<div class="main">
    &nbsp;
    <div class="navigation"><a href="/tp">讨论区</a>&nbsp;&gt;&nbsp;<a th:href="'/bbs/board/'+${pCategory.categoryId}"
                                                                    th:text="${pCategory.name}"></a>&nbsp;&gt;&nbsp;
        <span th:text="${category?.name}"></span>
    </div>
    <div class="board-info">
        <div class="board-info-con">
            <div class="cate-name" th:text="${pCategory.name}"></div>
            <div class="topic-count">帖子：
                <th:block th:text="${count}"/>
                今日：
                <th:block th:text="${todayCount}"/>
            </div>
            <div class="topic-desc" th:text="${pCategory.desc}"></div>
            <a href="/tp/pre/public" class="btn sub-new" id="post-btn">+&nbsp;&nbsp;发布新帖子</a>
        </div>
    </div>

    <div class="topic-list-con">
        <div class="cate-tag">

            <a th:href="'/tp/board/'+${pCategory.categoryId}"
               th:class="${#strings.isEmpty(categoryId)?'active':''}">全部</a>

            <a th:href="'/tp/sub/board/'+${item.categoryId}" th:each="item:${pCategory.children}"
               th:class="${!#strings.isEmpty(categoryId)&&categoryId==item.categoryId?'active':''}" th:text="${item.name}"></a>

        </div>


        <div class="topic-item-list">
            <div class="topic-item" th:if="${result.page.pageTotal>0}" th:each="item:${result.list}">
                <div class="user-icon">
                    <a th:href="'/user/'+${item.userId}"><img class="img-circle"
                                                              th:src="'/static/images/'+${item.userIcon}"/></a>
                </div>
                <div class="topic-item-info">
                    <div class="topic-item-title">

                        <span class="ding" th:if="${item.grade>0}">置顶</span>

                        <span class="jing" th:if="${item.essence==1}">精华</span>

                        <span class="vote" th:if="${item.topicType.getType()==1}">投票</span>

                        <a th:href="'/tp/'+${item.topicId}" class="title" th:text="${item.title}"></a>
                        <span class="time" th:text="${item.createTime}"></span>
                        <a class="topic-cate-tag"
                           th:href="'/tp/sub/board/'+${item.categoryId}"><span
                                th:text="${item.categoryName}"></span></a>
                    </div>
                    <div class="topic-item-summary" th:text="${item.summary}"></div>
                    <div class="image-thum topic-item-images" th:if="${!#lists.isEmpty(item.topicImageArray)}">

                        <a class="showImage" th:each="img,l:${item.topicImageArray}" th:if="l.index <=2"
                           href="javascript:;"><img
                                class="img-thumbnail" th:src="${img}"/></a>
                        <div class="clear"></div>
                    </div>
                    <div class="topic-count-info">
                        <a th:href="'/user/'+${item.userId}" class="user-info"><i class="icon icon-user-name"></i><span
                                th:text="${item.userName}"></span></a>
                        <span class="count"><i class="icon icon-read"></i><span>阅读：<th:block
                                th:text="${item.readCount}"/></span></span>
                        <span class="count"><i class="icon icon-comment"></i><span>评论：<th:block
                                th:text="${item.commentCount}"/></span></span>
                        <span class="count"><i class="icon icon-like"></i><span>喜欢：<th:block
                                th:text="${item.likeCount}"/></span></span>
                        <span class="count"><i class="icon icon-collection"></i><span>收藏：<th:block
                                th:text="${item.collectionCount}"/></span></span>
                    </div>
                </div>
                <div class="clear"></div>
            </div>
            <div class="no-data">没有帖子，赶紧抢沙发吧</div>
            <div id="page" class="page"></div>
            <div class="clear"></div>
        </div>
    </div>
</div>
<th:block th:replace="include/footer:: footer"/>
<th:block th:replace="include/top"/>
<script type="text/javascript" charset="utf-8" src="/static/laypage/laypage.js"></script>
<script text="text/javascript" th:inline="javascript">
    fzqblog.pageTotal = [[${result.page.pageTotal}]]
</script>
<script type="text/javascript" charset="utf-8" src="/static/js/bbs_list.js"></script>
</body>
</html>